/**
 * 用户相关信息存储
 */
export default {
  // 开启命名空间
  namespaced: true,
  state: {
    role: -1,
    userId: null,
    token: null,
  },
  mutations: {
    updateRole(state, val) {
      state.role = val
    },
    updateUserId(state, val) {
      state.userId = val
    },
    updateToken(state, val) {
      state.token = val
    },
    clearAuth(state) {
      state.role = -1
      state.userId = null
      state.token = null
    }
  },
  actions: {
  },
  getters: {
  }
}
